/*
 * Copyright (C) 2017-2019 Dremio Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import "~@app/components/colors.less";

:global {
  .textWithHelp {
    display: flex;
    align-items: baseline;
    position: relative; // for tooltip, which is absolutely positioned  

    &__content {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    &__tooltip {
      left: 100%;
      top: 0;
      width: auto !important;
      max-width: 450px;
      white-space: pre-line !important;
      word-wrap: break-word;

      &.--light {
        background-color: @aqua-spring !important;
        color: inherit !important;
        border: 1px solid @blue;
      }
    }

    // Todo: Clean up Tooltip component to use less instead of inline styles and add the color property there instead
    &__tooltipArrow {
      &.--light {
        border-color: transparent transparent @blue transparent !important;
        &:after {
          content: '';
          position: absolute;
          top: 1px;
          margin-left: -4px;
          width: 0;
          height: 0;
          border-style: solid;
          border-width: 0 4px 5px;
          border-color: transparent transparent @aqua-spring transparent;
        }
      }
    }
  }
}